<template>
	<view>
		<swiper indicator-dots class="start" @change="schange" :autoplay="true" :interval="3000" :duration="1000">
			<swiper-item>
				<view class="max">
					<image src="https://game.gtimg.cn/images/yxzj/img201606/freehero/vertical/548.jpg" mode="widthFix">
					</image>
				</view>
			</swiper-item>
			<swiper-item>
				<view class="max">
					<image src="https://game.gtimg.cn/images/yxzj/img201606/freehero/vertical/534.jpg" mode="widthFix">
					</image>
				</view>
			</swiper-item>
			<swiper-item>
				<view class="max">
					<image src="https://game.gtimg.cn/images/yxzj/img201606/freehero/vertical/542.jpg" mode="widthFix">
					</image>
				</view>
			</swiper-item>
		</swiper>
	</view>
</template>

<script>
	// var widths = document.body.clientWidth;
	// var heights = document.body.clientHeight;
	export default {
		data() {
			return {

			}
		},
		methods: {
			schange(event) {
				if (event.detail.current == 0) {
					uni.navigateTo({
						url: '/pages/index/index'
					});
				}

			},
		},

	}
</script>

<style>
	* {
		padding: 0;
		margin: 0;
		box-sizing: border-box;
	}

	html,
	body,
	div,
		{
		height: 100%;
	}

	uni-page-body,
	uni-view {
		height: 100%;	
	}

	.start {
		width: 100%;
		height: 100%;
	}

	image {
		width: 100%;
		height: 600px;
	}

	.max {
		width: 100%;
		height: 100%;
	}
</style>
